@echo off
set param=%1
set currentDir=%cd%
set appDir=C:\Users\Kos\KokosApp\Kokos
set earDir=%appDir%\KokosEAR\target
set skipTest=-st

if not [%currentDir%] == [%appDir%] ^
cd %appDir%

call mvn clean

if [%param%] == [%skipTest%] ^
call mvn package -Dmaven.test.skip=true

if [%param%] == [] ^
call mvn package

call asadmin deploy --force=true %earDir%\KokosEAR-1.0.ear
